package com.ciaojian.client.controller;

import com.ciaojian.core.util.Result;
import com.ciaojian.core.util.TokenKit;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * token Controller
 * 用于生成防重复点击用的 token
 *
 * @author Atlakyn
 */
@Api(tags = "token 相关接口")
@RestController
@RequestMapping("/api-token")
public class ApiTokenController {
    @ApiOperation("获取接口token")
    @PostMapping
    public Result createToken() {
        return Result.ok(TokenKit.createToken());
    }
}






